
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="UTF-8" />
    <title>百度网盟推广</title>
    <meta http-equiv="Content-Type" content="text/html" />

    <style type="text/css">
        html{color:#000;background-color:transparent;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal}ol,ul{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:text-top}sub{vertical-align:text-bottom}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit}input,textarea,select{*font-size:100%}legend{color:#000}body{margin:0;padding:0;}
        .bd-logo,.bd-logo2,.bd-logo3,.bd-logo4{text-decoration:none;cursor:pointer;display:block;overflow:hidden;z-index:2147483647}.bd-logo{height:18px;width:18px;background:url(http://cpro2.baidustatic.com/cpro/ui/noexpire/img/2.0.1/bg.png) no-repeat left top;background-position:0 0;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="http://cpro2.baidustatic.com/cpro/ui/noexpire/img/2.0.1/logo-border-light.png",sizingMethod="crop");_background:0}.bd-logo:hover{background-position:-70px 0;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="http://cpro2.baidustatic.com/cpro/ui/noexpire/img/2.0.1/logo-border-dark.png",sizingMethod="crop")}.bd-logo2{margin:0 2px 2px 0;height:14px;width:13px;background:url(http://cpro2.baidustatic.com/cpro/ui/noexpire/img/2.0.1/bg.png) no-repeat left top;background-position:0 -20px;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="http://cpro2.baidustatic.com/cpro/ui/noexpire/img/2.0.1/logo-noborder-light.png",sizingMethod="crop");_background:0}.bd-logo2:hover{background-position:0 -35px;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="http://cpro2.baidustatic.com/cpro/ui/noexpire/img/2.0.1/logo-noborder-dark.png",sizingMethod="crop")}.bd-logo3{height:18px;width:18px;background:url(http://cpro2.baidustatic.com/cpro/ui/noexpire/img/2.0.1/bg.png) no-repeat left top;background-position:-70px 0;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="http://cpro2.baidustatic.com/cpro/ui/noexpire/img/2.0.1/logo-border-dark.png",sizingMethod="crop");_background:0}.bd-logo3:hover{width:68px}
        .bd-logo4{height:18px;width:18px;left:0;background:url(http://cpro2.baidustatic.com/cpro/ui/noexpire/img/2.0.1/bd-logo4.png) no-repeat left top;background-position:center;background-size:100%,100%;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="http://cpro2.baidustatic.com/cpro/ui/noexpire/img/2.0.1/bd-logo4.png",sizingMethod="crop");_background:0}
        .loader{ text-align:center; width:90%; font-size:12px; padding:8px; border:solid 1px #aaaaaa; margin-top:30px; display:none; }.cf:before,.cf:after{content:"\20";display:table;}.cf:after{clear:both;}.cf{*zoom:1;}
        .textOverflow{white-space:nowrap;overflow:hidden;display:inline-block;width:100%;}.textOverflowEllipsis{-o-text-overflow:ellipsis;text-overflow:ellipsis;}.textOverflowClip{-o-text-overflow:clip;text-overflow:clip;}
html{
    width:100%;
    height: 100%;
}
.pic_container a img{
 float:left

}
    </style>
    <script type="text/javascript">
        var Base={config:{},cache:{},getKeysByType:function(b){b=(b||"class").toLowerCase();var a=b+"LoadFinished",c=b+"LoadFnArray",d=b+"LoadMap";this[a]="boolean"===typeof this[a]?this[a]:!0;this[c]=this[c]||[];this[d]=this[d]||{};return{status:a,array:c,map:d,type:b}},updateLoadStatus:function(b,a,c){c=this.getKeysByType(c);if(b&&(this[c.map][b]=a,"loaded"!==a))return this[c.status]=!1;b=!0;for(var d in this[c.map])if(d&&this[c.map].hasOwnProperty(d)&&"loaded"!==this[c.map][d]){b=!1;break}return this[c.status]=
        b},loadImage:function(b){var a=new Image;a.onload=a.onerror=a.onabort=function(){a.onload=a.onerror=a.onabort=null;this.updateLoadStatus(b,"loaded","image");if(this.imageLoadFinished)for(var c,d=0,h=this.imageLoadFnArray.length;d<h;d++)c=this.imageLoadFnArray.shift(),c()}.proxy(this);a.src=b},fastClone:function(b){var a=function(){};a.prototype=b;return new a},declare:function(b){b=b();var a=b.name;if(!a)throw"can't find the obj name";for(var c=b.namespace+"."+a,d=c.split("."),h=d.length,f=window,
        j="",e=0;e<h-1;e++){var g=d[e];f==window?(f[g]=window[g]=window[g]||{},j+=g):(f[g]=f[g]||{},j+="."+g);f=f[g];this.cache[j]=f}f[a]=f[a]||b;this.cache=this.cache||{};this.cache[c]=f[a];return!0},using:function(b,a,c){if(this.cache&&this.cache[b])return this.cache[b];a=a||"class";c=c||this.config.version[a]||"1.0.0";var d;switch(a){case "image":0>b.indexOf("http")&&(b=this.config.baseUrl+"img/"+(c&&"0"!==c?c.toString():"")+"/"+b);this.updateLoadStatus(b,"loading","image");this.loadImage(b);d=b;break;
        case "class":var h=this.getKeysByType(a);a=b.split(".");d=window[a[0]];for(var f=1,j=a.length;f<j;f++)d=d&&d[a[f]]?d[a[f]]:null;if(!d&&!this[h.map][b]){this.updateLoadStatus(b,"loading","class");var e=document.createElement("script");e.type="text/javascript";e.async=!0;a=this.config.baseUrl+"js/";c&&"0"!==c&&(a+=c.toString()+"/");a+=b.replace(/\./gi,"/")+".js";e.src=a.toLowerCase();e.onload=e.onerror=e.onreadystatechange=function(){if(/loaded|complete|undefined/.test(e.readyState)){e.onload=e.onerror=
        e.onreadystatechange=null;if(this.updateLoadStatus(b,"loaded","class"))for(var a,c=0,d=this[h.array].length;c<d;c++)a=this[h.array].shift(),a();e=void 0}}.proxy(this);c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(e,c)}this.cache=this.cache||{};this.cache[b]=d}return d},config:function(b){b&&(this.config=b)},run:function(b){if(b){var a=this.getKeysByType();this[a.status]?b():this[a.array].push(b)}}};
        Function.prototype.proxy=function(b){var a=this,c=Array.prototype.slice.apply(arguments).shift();return function(b){return a.apply(c,arguments)}};window.declare=Base.declare.proxy(Base);window.using=Base.using.proxy(Base);window.run=Base.run.proxy(Base);window.config=Base.config.proxy(Base);document.execCommand("BackgroundImageCache",!1,!0);
        
    </script>
    <style type="text/css">
        .container {
            background-color: white;
            overflow: hidden;
            display: block;
            font-family: Microsoft YaHei;
            margin: 0;
            padding: 0;
            position:relative;
        }
        
        .pic_container {
            display: block;
            float: left;
            overflow: hidden;
        }
        
        .pic_row {
            display: block;
            overflow: hidden;
            float: left;
        }
        
        .pic_item {
            display: block;
            overflow: hidden;
            float: left;
            text-align: center;
        }
        
        .pic {
            display: block;
            float: left;
            overflow: hidden;
        }
        
        .pic_title {
            display: block;
            overflow: hidden;
            float: left;
            text-align: center;
            text-decoration: none;
        }
        
        .pic_title_ptp {
            position: relative;
            overflow: hidden;
            display: block;
            text-decoration: none;
            text-align: center;
            float: left;
        }
        
        .link {
            text-decoration: none;
        }
        
        img.hover {
            -webkit-transition: -webkit-transform .5s ease-in;
            -moz-transition: -moz-transform .5s ease-in;
            -ms-transition: -ms-transform .5s ease-in;
            -o-transition: -o-transform .5s ease-in;
            transition: transform .5s ease-in;
            -webkit-transform: scale(1.2);
            -moz-transform: scale(1.2);
            -ms-transform: scale(1.2);
            -o-transform: scale(1.2);
            transform: scale(1.2);
        }                
        
        .luw {
            float:left;
            overflow:hidden;
        }
        .luw_single {
            float:left;
            overflow:hidden;
            text-decoration:none;
        }
        .luw_title {
            float:left;
            overflow:hidden;
            text-decoration:none;
        }
    </style>
</head>

<body><div style="display:none;"><img src="http://wn.pos.baidu.com/adx.php?c=d25pZD02ZmRjZTVkODQxYjFlODdiAHM9NmZkY2U1ZDg0MWIxZTg3YgB0PTE0NjI2ODkwODUAc2U9MQBidT00AHByaWNlPVZ5N2RQUUFPankxN2pFcGdXNUlBOG9uOVZtajVqeGJQMTFWY3VRAGNoYXJnZV9wcmljZT0xAHNoYXJpbmdfcHJpY2U9MTAwMAB3aW5fZHNwPTQAY2htZD0xAGJkaWQ9NjE2QTM3NzI4NDA2QzJCMkNGNzlDMzA2MEM0RDU3QTkAY3Byb2lkPTlFQzVFQTc3RjRFOThCRTNENkE2OTZCQzA5NUYyODc0AHdkPTAAYmNobWQ9MAB2PTEAaT1mMzhkMDJjNg"  height="1px" width="1px" alt="" /></div>
    <!-- main -->
    <!--div class="container" id="cpro_container">
    </div-->
    <div class="container" id="cpro_container">
        <!--a class="bd-logo4" href="http://wangmeng.baidu.com" title="百度网盟推广" target="_blank" onfocus="this.blur()"></a-->
    </div>
    <script type="text/javascript">
        var ads = [{"bid":"","curl":"http://cpro.baidu.com/cpro/ui/uijs.php?adclass=0&app_id=0&c=news&cf=1&ch=0&di=1&fv=0&is_app=0&jk=7be8b141d8e5dc6f&k=%F7%EC%B0%B2%B7%D2&k0=%F7%EC%B0%B2%B7%D2&kdi0=1&luki=1&mcpm=8903&n=10&p=baidu&q=63019065_cpr&rb=0&rs=1&seller_id=1&sid=6fdce5d841b1e87b&ssp2=2&stid=4002&t=tpclicked3_mob&td=2582406&tu=u2582406&u=http%3A%2F%2Fwap%2Ekmobi%2Enet%2Fh5%2Flist%2F3&urlid=0","desc":"黛安芬","height":94,"image_url":"http://t10.baidu.com/it/u=3334814142,2362060578&fm=76","isHb":false,"lpId":1,"mt_desc":"黛安芬","mt_img_n":1,"mt_img_url_0":"http://t10.baidu.com/it/u=3334814142,2362060578&fm=76","mt_title":"名品导购网黛安芬","surl":"","title":"黛安芬","type":"text","width":320,"word_src":"6"}];
        var ad_num = window.ads.length;
        for (var i=0; i<ad_num; i++) {
            if (!window.ads[i].image_url || window.ads[i].image_url == "") {
                window.ads[i].image_url = "http://t11.baidu.com/it/u=675809101,3723009829&fm=76"
            }
            if (!window.ads[i].mt_img_url_0 || window.ads[i].mt_img_url_0 == "") {
                window.ads[i].mt_img_url_0 = "http://t11.baidu.com/it/u=675809101,3723009829&fm=76"
            }
        }  
        var config = {"IF_m_char":14,"at":3,"conpb":12,"conpl":0,"conpr":1,"conpt":12,"exp_flag":0,"exp_flag_mob":0,"exp_flag_secretary":0,"imC":1,"imHeight":70,"imR":1,"imSiteRecMax":0,"imStid":115,"imTab":1,"imWidth":95,"itecpl":2,"n":"63019065_cpr","pat":15,"ptDesc":2,"ptFC":"#000000","ptFF":"%E5%BE%AE%E8%BD%AF%E9%9B%85%E9%BB%91","ptFS":15,"ptFW":0,"ptLogo":1,"ptLogoBg":"#DBDBDB","ptLogoC":"#FFFFFF","ptLogoFS":14,"ptLogoH":0,"ptLogoW":0,"ptp":0,"rsi0":320,"rsi1":94,"rss1":"#FFFFFF","rss2":"#000000","rtn":1,"scale":"20.3","skin":"mobile_skin_white_red","titFF":"%E5%BE%AE%E8%BD%AF%E9%9B%85%E9%BB%91","titFS":12,"txtC":0,"txtLC":0,"txtR":0,"txtRH":0,"txtSiteRecMax":0};
        var bdJinglianExpFlag=1;
        var bdJinglianHoverTitle="";
    </script>
    <script type="text/javascript">
        <!-- htmlcs-disable -->
var ThisPage = {
    init: function() {
        this._init_global_variables();
        this._init_exp();
        this._init_conatiner();
        if (this.enable_feed_refact) {
            this._init_ads_mt_info();
        } else {
            this._init_ads();
        }
        this._init_luw_title();
        this._init_desc();
        this._init_images();
        this._init_logo();
        this._calc_layout();
        var container = this.get("cpro_container");
        
        this.set_config();
        this.paint_ad(container);
        this.bindClickInAppIFrame.run();

    },
    _init_ads: function() {
        //for (var i = 0; i < ads.length; ++i) {
        //    if (ads[i].word_src != "pa")
        //        ads[i].curl = ads[i].curl.replace(/&stid=\d*/, '&stid=4002');
        //}
        this.news = [];
        var title_ind = config.rtn - 1;
        var ads_step = 3;
        // 广告三个一组，一个title对应三个推词
        // ads存放格式为：三个推词（组1），三个推词（组2）....，然后title1,title2
        // 其中title是word_src==pa的ad
        while (ads.length && ads[ads.length - 1].word_src == "pa") {
            var t = ads.pop();
            var to = new Object();
            var index = title_ind * ads_step;
            if (index > (ads.length - 1) || (index < 0)) {
                // error in ads structure
                index = 0;
            }
            var from = ads[index];
            for (var i in from)
                to[i] = from[i];
            to.title = t.title;
            to.image_url = t.pa_url;
            to.curl = ads[index].curl.replace(/&k=[^&]*/g, "&k=" + t.title); //.replace(/&stid=\d*/, '&stid=4002');
            to.word_src = 'pa';
            this.news.unshift(to);
            title_ind -= 1;
        }

        var total_ads = (config.txtR || 0) * (config.txtC || 0);
        var cur_len = ads.length;
        while (ads.length < total_ads) {
            var random_id = parseInt(Math.random() * (cur_len - 1));
            var dup_ad = new Object();
            for (var i in ads[random_id]) {
                dup_ad[i] = ads[random_id][i];
            }
            ads.push(dup_ad);
        }
        if (ads.length) {
            var tu_match = ads[0].curl.match(/tu=.*?&/);
            if (tu_match && tu_match.length) {
                config.tu = tu_match[0].replace(/tu=/, "").replace("&", "");
            }
        }

    },
    _init_ads_mt_info: function() {
        this.news = ads;
    },
    _init_exp: function() {
        this.enable_feed_refact = true;
        if (config.exp_flag_mob == 140) {
            this.enable_feed_refact = false;
        }
    },

    _init_luw_title: function() {
        // 初始化图片上方的title
        this.luwTitleHeightDistance = 4;
        this.luwTitleFontSize = this.get_value(config.ptFS, 16);
        this.luwTitleFontColor = this.get_value(config.ptFC, "#000000");
        this.luwTitleHeight = this.get_value(config.ptLH, this.luwTitleFontSize + this.luwTitleHeightDistance);
        var font_family = this.get_value(config.ptFF, "%E5%BE%AE%E8%BD%AF%E9%9B%85%E9%BB%91");
        this.luwTitleFontFamily = decodeURIComponent(font_family);
        var font_weight = this.get_value(config.ptFW, 1);
        if (font_weight == 0) {
            this.luwTitleFontWeight = "normal";
        } else {
            this.luwTitleFontWeight = "bold";
        }
        
    },
    _init_desc: function() {
        // 初始化图片下方的描述：不一定存在
        this.luwFontColor = this.get_value(config.rss2, "#888");
        this.luwFontSize  = this.get_value(config.titFS, 12);
        this.luwHeight    = this.get_value(config.titLH, this.luwFontSize + 2);
        var font_family = this.get_value(config.titFF, "%E5%BE%AE%E8%BD%AF%E9%9B%85%E9%BB%91");
        this.luwFontFamily = decodeURIComponent(font_family);
        // 描述类型：
        // 0: 利用推词拼接出描述
        // 1: 利用时间来表示描述
        // 2: 没有描述
        this.desc_info = this.get_value(config.ptDesc, this.HAS_NO_DESC);
    },
    _init_logo: function() {
            // Logo类型
            // 熊爪/推广
            // ptLogo=0,1
            this.logo_info = this.get_value(config.ptLogo, this.LOGO_NORMAL);
            this.logo_font_size = 10;
            this.logo_content = "推广";
            this.logo_div = document.createElement("a");
         
           
            this.logo_div_style = {};
            if (this.logo_info == this.LOGO_NORMAL) {
                var img_div = document.createElement("img");
                img_div.setAttribute("src", "http://cpro2.baidustatic.com/cpro/ui/noexpire/img/2.0.1/bd-logo4.png");
                this.logo_div.appendChild(img_div);
                this.logo_div_style["margin-top"] = 0;

                
                
                this.logo_div.setAttribute("class", "bd-logo4");                
                // this.logo_div.setAttribute("onfocus", "this.blur()");
            } else if (this.logo_info == this.LOGO_SPREAD) {
                
                // 想使用推广的话，必须加描述
                this.desc_info = this.HAS_TIME_DESC;
                this.logo_div.innerHTML = this.logo_content;
                this.logo_div.setAttribute("class", "link");
                this.logo_div.setAttribute("id", "promote");                 
              
                this.logo_div_style["position"] = "absolute";
                this.logo_div_style["bottom"] = 0;
                this.logo_div_style["right"] = 0;
                // logo configuration
                var logoFS = this.get_value(config.ptLogoFS, 10);
                var logoC  = this.get_value(config.ptLogoC, "#FFFFFF");
                var logoBg = this.get_value(config.ptLogoBg,"#DBD5D5");
                this.logo_div_style["height"] = logoFS;//this.luwFontSize;
                this.logo_height = this.logo_div_style["height"];
                // if ((this.pic_info == 2) && (this.desc_info == 2)) {
                //     logo_div_style["height"] = this.luwTitleFontSize - 5;
                // }
                this.logo_div_style["line-height"] = this.logo_div_style["height"];
                this.logo_div_style["width"] = this.chrlen(this.logo_content, this.logo_font_size * 1.2);
                this.logo_div_style["font-size"] = this.logo_div_style["height"];
                this.logo_div_style["color"] = logoC; //"#DBD5D5";
                this.logo_div_style["background-color"] = logoBg; //"#DBD5D5";
                // this.logo_div_style["position"] = "absolute";
                // this.logo_div_style["bottom"] = 0;
                if (this.pic_info == 0) {
                    // this.logo_div_style["float"] = "right";
                    // 忽略这个参数，目前全部：float-left
                    this.logo_div_style["float"] = "left";
                } else if (this.pic_info == 1) {
                    this.logo_div_style["float"] = "left";
                    this.logo_div_style["margin-bottom"] = 0;
                }
                // logo_div_style["float"] = "right";
                // this.logo_div.setAttribute("style", this.gen_style(logo_div_style));
                this.logo_divs = [];
            }
            if(window.bdJinglianExpFlag && window.bdJinglianExpFlag == 1){
            this.logo_div.setAttribute("href", "javascript:;");
            this.logo_div.setAttribute("title", window.bdJinglianHoverTitle || "");
        }else{
            this.logo_div.setAttribute("href", "http://wangmeng.baidu.com");
            this.logo_div.setAttribute("title", "百度网盟推广");
            this.logo_div.setAttribute("target", "_blank");
        }
        },
    _init_images: function() {
        this.pic_h = this.get_value(config.imHeight, 0);
        this.pic_w = this.get_value(config.imWidth, 0);
        // 图片的默认间距, 现在只是传入，暂时不使用
        // 个人觉得：图片之间是均分的
        this.image_gap = this.get_value(config.itecpl, 10);
    },
    _calc_layout: function() {
        // 计算主函数
        // 计算title高度
        // 计算图片高度：图片宽和高是一致的
        
        // 判断是否需要最下面的描述字段
    
        // 我们假设高度已经知道，title和底部的距离也已经设置好
        var remained_height = this.pic_container_style["height"] - this.luwTitleHeight * (config.rtn||1);
        if (this.desc_info != this.HAS_NO_DESC) {
            remained_height -= this.luwHeight;
        }
        
        // 将image_gap解析成百分比
        this.pic_w = (this.pic_container_style["width"]) / config.txtC;
        this.image_gap = this.pic_w * this.image_gap / 100.0;
        this.pic_w -= this.image_gap;
        this.pic_h = remained_height / (config.rtn||1);
        var image_ratio = this.pic_w / this.pic_h;
        if (image_ratio < this.image_ratio_low_bound) {
            this.pic_h = this.pic_w / this.image_ratio_low_bound;
        } else if (image_ratio > this.image_ratio_high_bound) {
            this.pic_w = this.pic_h * this.image_ratio_high_bound;
        }
        this.image_gap = (this.pic_container_style["width"] - this.pic_w * config.txtC)/(config.txtC - 1);    
        

    },
    // 重写一些参数
    set_config: function() {
        window.config = window.config;
    },
    _init_conatiner: function() {
        //广告位样式
        var container = this.get("cpro_container");
        var container_style = {};
        container_style['background-color'] = this.get_value(config.rss1, "#ffffff");
        // 对于全图信息流的确定其4个方向的padding
        this.container_padding_left  = this.get_value(config.conpl, 5);
        this.container_padding_right = this.get_value(config.conpr, 5);
        this.container_padding_top        = this.get_value(config.conpt, 5);
        this.container_padding_bottom     = this.get_value(config.conpb, 5);
        container_style['height'] = window.config.rsi1;
        container_style['width'] = window.config.rsi0;
        container.setAttribute("style", this.gen_style(container_style));
        this.log_div = document.createElement("a");
        
       

        // pic container
        this.pic_container_style = {};
        this.pic_container_style["height"] = config.rsi1 - this.container_padding_top - this.container_padding_bottom;
        this.pic_container_style["width"] = config.rsi0 - this.container_padding_left - this.container_padding_right;
        this.pic_container_style["margin-left"]    = this.container_padding_left;
        this.pic_container_style["margin-right"]   = this.container_padding_right;
        this.pic_container_style["margin-top"]     = this.container_padding_top;
        this.pic_container_style["margin-bottom"]  = this.container_padding_bottom;
    },
    _init_global_variables: function() {
        // must be called first
        config.txtC = 3;
        config.txtR = ads.length / config.txtC;
        
        // 描述配置
        this.HAS_NO_DESC = 2;
        this.HAS_NORMAL_DESC = 0;
        this.HAS_TIME_DESC = 1;        
        // logo 配置
        this.LOGO_NORMAL = 0; // 熊爪
        this.LOGO_SPREAD = 1; // 推广字样
        
        // 图片配置
        this.image_ratio_low_bound = 1.3;
        this.image_ratio_high_bound = 1.6;
    },
    gen_style: function(style) {
        var result = "";
        for (var key in style) {
            result += key + ":" + style[key] + (typeof style[key] == 'number' ? "px;" : ";");
        }
        return result;
    },
    bindClickInAppIFrame: {
        // 针对inapp的iframe打开异常的重绑定
        // 将超链接<a>，绑定onclick为window.open方式
        tu: "",
        tu_list: ["u1990394"],
        init: function() {
            if (typeof config.tu == 'undefined') {
                return false;
            }
            this.tu = config.tu;
        },
        run: function() {
            this.init();
            for (var i = 0; i < this.tu_list.length; ++i) {
                if (this.tu_list[i] == this.tu) {
                    this.bindClick('pic_container');
                    break;
                }
            }
        },
        bindClick: function(containerId) {
            var container = document.getElementById(containerId);
            var linkArray = container.getElementsByTagName("a");
            for (var i = 0; i < linkArray.length; i++) {
                linkArray[i].onclick = this.mouseClickHandler;
            }
        },
        mouseClickHandler: function(event) {
            var event = window.event ? window.event : event;
            if (event) {
                target = event.target || event.srcElement;
                if (target.tagName.toLowerCase() !== "a") {
                    target = target.parentNode;
                }
                if (target && target.href) {
                    window.open(target.href);
                }
            }
            return false;
        },
    },
    paint_ad: function(dom) {

        var pic_container = document.createElement("div");
        pic_container.setAttribute("class", "pic_container");
        pic_container.setAttribute("id", "pic_container");
        pic_container.setAttribute("style", this.gen_style(this.pic_container_style));

        for (var row = 0; row < config.rtn; row += 1) {

            // pic title
            var ad_ind = row;
            var pic_title = document.createElement("div");
            var pic_title_style = {};
            pic_title_style["height"] = this.luwTitleHeight;
            pic_title_style["width"] = this.pic_container_style["width"];
            pic_title_style["font-weight"] = this.luwTitleFontWeight;
            pic_title_style["font-size"] = this.luwTitleFontSize;
            pic_title_style["color"] = this.luwTitleFontColor;
            pic_title_style["line-height"] = this.luwTitleHeight;
            pic_title_style["overflow"] = "hidden";
            if (this.enable_feed_refact) {
                pic_title.innerHTML = this.news[row].mt_title;
            } else {
                pic_title.innerHTML = this.news[row].title;
            }
            pic_title.setAttribute("style", this.gen_style(pic_title_style));
            pic_title.setAttribute("id", "pic_title_" + row);

            var pic_row = document.createElement("div");
            pic_row.setAttribute("class", "pic_row");
            pic_row.setAttribute("id", "pic_row" + "_" + row);
            var pic_row_style = {};
            pic_row_style["float"] = "left";
            pic_row_style["height"] = this.pic_h;
            pic_row_style["width"] = this.pic_container_style.width;
            pic_row.setAttribute("style", this.gen_style(pic_row_style));
            // pic_row.appendChild(pic_title);

            for (var col = 0; col < config.txtC; col += 1) {
                var pic_item = document.createElement("div");
                pic_item.setAttribute("class", "pic_item");
                pic_item.setAttribute("id", "pic_item" + "_" + row + "_" + col);
                var pic_item_style = {};
                // pic_item_style["margin"] = borderWidth;
                if ((config.txtC -1 )!= col) {
                    pic_item_style["margin-right"] = this.image_gap;
                }

                pic_item_style["height"] = this.pic_h;
                pic_item_style["width"] = this.pic_w;
                pic_item.setAttribute("style", this.gen_style(pic_item_style));


                var pic_div = document.createElement("div");
                var pic_div_style = {};
                pic_div.setAttribute("class", "pic");
                pic_div.setAttribute("id", "pic" + "_" + row + "_" + col);

                pic_div_style["height"] = this.pic_h;
                pic_div_style["width"] = this.pic_w;
                pic_div.setAttribute("style", this.gen_style(pic_div_style));

                var pic = document.createElement("img");
                var pic_style = {};
                var reserve_border = 0;
                pic_style["height"] = this.pic_h;
                pic_style["width"]  = this.pic_w;
                // pic_style["border"] = "1px solid rgba(0,0,0,0.5)";
                if (this.enable_feed_refact) {
                    pic.setAttribute("src", ads[row]["mt_img_url_"+col]);
                } else {
                    pic.setAttribute("src", ads[row * config.txtC + col].image_url);
                }
                pic.setAttribute("style", this.gen_style(pic_style));
                pic.setAttribute("id", "img_" + row + "_" + col);

                var pic_a = document.createElement("a");
                // remove href
                //pic_a.setAttribute("href", ads[row * config.txtC + col].curl);
                //pic_a.setAttribute("target", "_blank");
                pic_a.appendChild(pic);
                pic_div.appendChild(pic_a);

                pic_item.appendChild(pic_div);
                pic_row.appendChild(pic_item);
            }
            pic_row.setAttribute("onclick", "window.open(\'" + ads[ad_ind].curl + "\');");
            pic_container.appendChild(pic_title);
            pic_container.appendChild(pic_row);
            
        }
         if (this.desc_info == this.HAS_TIME_DESC) {
            // 需要画出整个块
            var cur_time = new Date();
            var time_desc_str = cur_time.getFullYear() + "-" + (cur_time.getMonth() + 1) + "-" + cur_time.getDate();
            var time_desc_style = {};
            time_desc_style["height"] = this.luwHeight;
            time_desc_style["width"] = this.chrlen(time_desc_str);
            time_desc_style["color"] = this.luwFontColor;
            time_desc_style["font-size"] = this.luwFontSize;
            var desc_div = document.createElement("div");
            desc_div.innerHTML = time_desc_str;
            desc_div.setAttribute("style", this.gen_style(time_desc_style));
            pic_container.appendChild(desc_div);
        }
        
        if (this.logo_info == this.LOGO_NORMAL) {
           // this.logo_div_style["float"] = "left";
            this.logo_div.setAttribute("style", this.gen_style(this.logo_div_style));
            pic_container.appendChild(this.logo_div);
        } else if (this.logo_info == this.LOGO_SPREAD) {
            
            var getCproContainer = this.get("cpro_container");
            this.logo_div_style["float"] = "right";
            this.logo_div.setAttribute("style", this.gen_style(this.logo_div_style));
     
            getCproContainer.setAttribute('position','relative');
            
            getCproContainer.appendChild(this.logo_div);
        }
        dom.appendChild(pic_container);
    },
    get: function(id) {
        return document.getElementById(id)
    },
    get_value: function(target_value, default_value) {
        if (typeof target_value !== 'undefined') {
            return target_value;
        } else {
            return default_value;
        }
    },

    // 获得一段字符的长度（px）
    chrlen: function(str, fs) {
        var ch = 0;
        var en = 0;
        for (var i = 0; i < str.length; ++i) {
            if (escape(str[i]).indexOf("%u") < 0) {
                en += 1
            } else {
                ch += 1
            }
        }
        return Math.ceil(ch * fs + en * fs / 2);
    },

    // 根据长度自动截断字符
    shorten: function(str, length, fontSize) {
        if (length <= 0) {
            return -1;
        }
        var len = this.chrlen(str, fontSize);
        if (len <= length) {
            return str
        }
        var index = str.length;
        //while (len + fontSize > length && len > 0) {
        while (len > length && len > 0) {

            str = str.substring(0, str.length - 1);
            len = this.chrlen(str, fontSize);
            //if (len + fontSize <= length) {
            if (len <= length) {
                //str += "..";
                str += "";
                return str;
            }
        }
        return -1;
    },
    bind: function(element, eventType, handler) {
        if (window.addEventListener) {
            element.addEventListener(eventType, handler, false);
        } else {
            element.attachEvent("on" + eventType, handler);
        }
    }
};
run(ThisPage.init.proxy(ThisPage));

        (function(){try{var d={getCookie:function(p,t){var o;var t=t||window;var s=t.document;var q=new RegExp("(^| )"+p+"=([^;]*)(;|\x24)");var r=q.exec(s.cookie);if(r){o=r[2]}return o},setCookie:function(q,r,p){p=p||{};var o=p.expires;if("number"==typeof p.expires){o=new Date();o.setTime(o.getTime()+p.expires)}document.cookie=q+"="+r+(p.path?"; path="+p.path:"")+(o?"; expires="+o.toGMTString():"")+(p.domain?"; domain="+p.domain:"")+(p.secure?"; secure":"")}};var g={sendByIframe:function(o){var p=document.createElement("iframe");p.id="ifr"+parseInt(Math.random()*100000);p.style.display="none";p.setAttribute("src",o);document.body.insertBefore(p,document.body.firstChild)},sendByImage:function(p,r){var o=new Image();var q="cpro_log_"+Math.floor(Math.random()*2147483648).toString(36);r=r||window;r[q]=o;o.onload=o.onerror=o.onabort=function(){o.onload=o.onerror=o.onabort=null;r[q]=null;o=null};o.src=p}};var f=d.getCookie("BAIDUID");var e=d.getCookie("CPROID");var k=d.getCookie("ISUS");var h=d.getCookie("ISBID");var l=false;var m=false;var n=(new Date()).getTime();if(!e&&f){var j="http://cpro.baidustatic.com/sync.htm?cproid="+encodeURIComponent(f);g.sendByIframe(j)}if(e&&!k){l=true}else{if(e&&k&&e!==k){l=true}}if(f&&!h){m=true}else{if(f&&h&&f!==h){m=true}}if(l||m){var a=new Date();a.setTime(a.getTime()+86400000);d.setCookie("ISBID",f||"1",{path:"/",expires:a});d.setCookie("ISUS",e||"1",{path:"/",expires:a});if(e&&f){var c=e;var b=e.indexOf(":");if(b&&b>0){c=e.substring(0,b)}g.sendByIframe("http://s.cpro.baidu.com/s.htm?cproid="+c+"&t="+n)}if(e){g.sendByIframe("http://pos.baidu.com/sync_pos.htm?cproid="+encodeURIComponent(e)+"&t="+n);var c=e;var b=e.indexOf(":");if(b&&b>0){c=e.substring(0,b)}}}}catch(i){}})();
        
        // var jsUrl='http://cpro.baidustatic.com/cpro/ui/noexpire/js/3.0.5/closefeedback.min.js';
        var jsUrl='http://127.0.0.1/closefeedback3_lu.js';
        var bdUserPreferenceExpFlag=1;var bdJinglianExpFlag=1;var preferenceInfo="czE9MTg3Njc0NzczNgFzMj0xMTAyMTc4NDI3AXJlcXVybD1odHRwJTNBJTJGJTJGd2FwJTJFa21vYmklMkVuZXQlMkZoNSUyRmxpc3QlMkYzAWNudG49NjMwMTkwNjVfY3ByAXR1PXUyNTgyNDA2AWlwPTM4MzMxNDYzNzgBY3JjPTI0Njc2MzY3MTE=";var bdJinglianHoverTitle="";var bdUserPreferenceReason=[{"id":5,"name":"视觉干扰","type":0},{"id":6,"name":"内容不宜","type":0},{"id":7,"name":"不感兴趣","type":0},{"id":8,"name":"其它","type":0},{"id":1005,"name":"视觉干扰","type":1},{"id":1006,"name":"内容不宜","type":1},{"id":1007,"name":"不感兴趣","type":1},{"id":1008,"name":"其它","type":1}]||[];var loadJs=function(f,e){var h=document.createElement("script");h.onload=function(){e()};h.onreadystatechange=function(){/loaded|complete/.test(h.readyState)&&e()};h.src=f;var g=document.getElementsByTagName("script")[0];g.parentNode.insertBefore(h,g)};window.onload=function(){if(bdUserPreferenceExpFlag){loadJs(jsUrl,function(){})}};
        var oDiv=document.getElementById("tipWrapper"),oHtml=document.getElementsByTagName("html")[0],deviceWidth=document.documentElement.clientWidth,deviceHeight=document.documentElement.clientHeight,initialRem=6.4;oHtml.style.fontSize=deviceWidth/initialRem+"px";
    </script>

</body>

</html>
